package com.lingchen.dao;

import com.lingchen.entity.Collect;
import com.lingchen.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Author    lingchen
 * Email     838878458@qq.com
 * Time      2017/4/24
 * Function  用户操作
 */
@Repository
public interface UserDao {

    /**
     * 插入用户
     */
    int insertUser(User user);

    /**
     * 查询用户
     */
    User selectUser(User user);

    /**
     * 插入收藏数据
     */
    int insertCollects(Collect... collects);

    /**
     * 获取收藏数据
     */
    List<Collect> insertCollects(@Param("user_name") long userName);
}
